package com.bp.scoringgun.service.impl;


import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.bp.scoringgun.entity.Repo;
import com.bp.scoringgun.mapper.RepoMapper;
import com.bp.scoringgun.service.RepoService;
import org.springframework.stereotype.Service;

@Service
public class RepoServiceImpl extends ServiceImpl<RepoMapper, Repo> implements RepoService {
    public double getProjectParameter(Long repoId) {
        // 假设有逻辑或数据库字段来定义项目的权重参数
        Repo repo = this.getById(repoId);
        return repo != null && repo.getOverallScore() != null ? repo.getOverallScore() : 0.0;  // 默认值为 0.0
    }
}